<?php
$pdo = new PDO("mysql:host=127.0.0.1;port=3306;dbname=dollarkiller","username","password");
$pdo->exec("SET NAMES UTF8");
$pdo->beginTransaction();

$sql = "SELECT * FROM dab WHERE id:id";
$stmt = $pdo->prepare($sql);
$id = 2;
$stmt->bindParam(':id',$id);
$rel = $stmt->execute();
if($rel) {
    $pdo->commit();
}else {
    $pdo->rollBack();
}
$pdo->setAttribute(PDO::ATTR_AUTOCOMMIT,1);